﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vRightGroup
	/// </summary>
	[Serializable]
	public class vRightGroup : Entity 
	{ 
		 public vRightGroup() 
            : base("vRightGroup") 
        { 

        }


		#region Model
		private int _UID;
		private string _GroupCode;
		private string _GroupName;
		private string _GroupDsc;
		private bool _IsSystem;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
		private string _UserCreate;
		private string _UserModify;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GroupCode
		{
			get{ return _GroupCode; }
			set
			{
				this.OnPropertyValueChange(_.GroupCode,_GroupCode,value);
				this._GroupCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GroupName
		{
			get{ return _GroupName; }
			set
			{
				this.OnPropertyValueChange(_.GroupName,_GroupName,value);
				this._GroupName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GroupDsc
		{
			get{ return _GroupDsc; }
			set
			{
				this.OnPropertyValueChange(_.GroupDsc,_GroupDsc,value);
				this._GroupDsc = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool IsSystem
		{
			get{ return _IsSystem; }
			set
			{
				this.OnPropertyValueChange(_.IsSystem,_IsSystem,value);
				this._IsSystem = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCreate
		{
			get{ return _UserCreate; }
			set
			{
				this.OnPropertyValueChange(_.UserCreate,_UserCreate,value);
				this._UserCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserModify
		{
			get{ return _UserModify; }
			set
			{
				this.OnPropertyValueChange(_.UserModify,_UserModify,value);
				this._UserModify = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.GroupCode,
				_.GroupName,
				_.GroupDsc,
				_.IsSystem,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate,
				_.UserCreate,
				_.UserModify
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_GroupCode,
				_GroupName,
				_GroupDsc,
				_IsSystem,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate,
				_UserCreate,
				_UserModify
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "GroupCode":
                    this._GroupCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "GroupName":
                    this._GroupName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "GroupDsc":
                    this._GroupDsc = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSystem":
                    this._IsSystem = DataHelper.ConvertValue<bool>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCreate":
                    this._UserCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModify":
                    this._UserModify = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "GroupCode":
                    return this._GroupCode; 
				case "GroupName":
                    return this._GroupName; 
				case "GroupDsc":
                    return this._GroupDsc; 
				case "IsSystem":
                    return this._IsSystem; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				case "UserCreate":
                    return this._UserCreate; 
				case "UserModify":
                    return this._UserModify; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vRightGroup");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vRightGroup","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GroupCode = new Field("GroupCode","vRightGroup","GroupCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GroupName = new Field("GroupName","vRightGroup","GroupName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GroupDsc = new Field("GroupDsc","vRightGroup","GroupDsc");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSystem = new Field("IsSystem","vRightGroup","IsSystem");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vRightGroup","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vRightGroup","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vRightGroup","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vRightGroup","ModifyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreate = new Field("UserCreate","vRightGroup","UserCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModify = new Field("UserModify","vRightGroup","UserModify");
		}
		#endregion

 
	}
}

